﻿/**
 * @author sminutoli
 */
 
import com.dinmax.flash.draw.cabeza.*

class DialogCabeza
extends ControlCabeza
implements SelectedListener {
	
	private var txt_label:TextField;
	private var mcAccept:ButtonCabeza;
	private var mcDelete:ButtonCabeza;
	
	public function setLabel(label:String):Void {
		txt_label.text = label;
		return;
	};
		
	public function initChild(control:ControlCabeza):Void {
		//trace("DialogCabeza.as initchild()= "+control);
		control.addListener(this);
		return;
	};
	
	public function selected(control:ControlCabeza):Void {
		switch(control){
			case this.mcAccept:
			this.setValue("algo");
			break;
			
			case this.mcDelete:
			this.setValue(undefined);
			break;
			
			default:
			trace("DialogCabeza.as selected | no encuentro nada putos");
			break;
		};
		this.selectEvent();
		return;
	};
		
};